package com.taoyusen.common.base
{
	import flash.events.IEventDispatcher;
    import flash.events.EventDispatcher;
    import flash.events.Event;
    [Bindable]
	public class DataLabel implements IEventDispatcher
	{
		public function DataLabel(data:String,label:String,key:String=null)
		{
			 dispatcher = new EventDispatcher(this);
			_data=data;
			_label=label;
			_key=key;
		}
		private var  _data:String;
		private var _label:String;
		private var _key:String;		
		
		public function get data():String{
			return _data;
		}
		public function set data(data:String):void{
			_data=data;
		}
		public function get label():String{
			return _label;
		}
		public function set label(label:String):void{
			_label=label;
		}
		
		public function get key():String{
			return _key;
		}
		public function set key(key:String):void{
			_key=key;
		}
				
		private var dispatcher:EventDispatcher;
           
	    public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void{
	        dispatcher.addEventListener(type, listener, useCapture, priority);
	    }
	           
	    public function dispatchEvent(evt:Event):Boolean{
	        return dispatcher.dispatchEvent(evt);
	    }
	    
	    public function hasEventListener(type:String):Boolean{
	        return dispatcher.hasEventListener(type);
	    }
	    
	    public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void{
	        dispatcher.removeEventListener(type, listener, useCapture);
	    }
	                   
	    public function willTrigger(type:String):Boolean {
	        return dispatcher.willTrigger(type);
	    }
	}
}